# -*- coding: utf-8 -*-
from db.mysql import MysqlClient
from common.helper import Helper
class Arrangement( object ):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "住院医疗保险"

    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):
            data["name"] = self.name
            data["company"] = "平安保险"
            data["year"] = item["year"]
            data["socialSec"] = item["socialSec"]
            data["expire"] = item["expire"]
            data["payType"] = "年交"
            data["hospitalMedical"]= "5000" if item["hospitalMedical"] == "5000" else item["hospitalMedical"]
            data["generalHosAllowance"]=item["generalHosAllowance"]
            data["cancerHosAllowance"]=item["cancerHosAllowance"]
            data["operationHosAllowance"]= item["operationHosAllowance"]
            data["price"] = item["price"]
            Helper.mergeTable( self.name,self.mysql,data)
